//
//  TitleDetailTableViewCell.m
//  OneCreditTreasure
//
//  Created by iOS Grouper on 16/8/29.
//
//

#import "TitleDetailTableViewCell.h"

@implementation TitleDetailTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self creatView];
    }
    
    return self;
}
- (void)creatView{
    _titleL = [UILabel new];
    [self.contentView addSubview:_titleL];
    [_titleL mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(15 * AUTO_HEIGHT);
        make.centerXWithinMargins.mas_equalTo(self.contentView);
        make.height.mas_equalTo(15 * AUTO_HEIGHT);
        
    }];
    _titleL.text = @"帕沙特2011款1.8TSI自动";
    _titleL.font = [UIFont fontWithName:ZIXING size:TEXTCONTENTFONT];
    
    //首付
    _firstPriceL = [UILabel new];
    [self.contentView addSubview:_firstPriceL];
    [_firstPriceL mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(_titleL.mas_bottom).offset(10 * AUTO_HEIGHT);
        make.centerXWithinMargins.mas_equalTo(self.contentView);
        make.height.mas_equalTo(15 * AUTO_HEIGHT);
        
    }];
    _firstPriceL.text  = @"首付2.85万";
    _firstPriceL.textColor = HS;
    _firstPriceL.font = [UIFont fontWithName:ZIXING size:TEXTLABELFONT];
    
    
    //月供
    _mouthPriceL = [UILabel new];
    [self.contentView addSubview:_mouthPriceL];
    [_mouthPriceL mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.height.mas_equalTo(_firstPriceL);
        make.right.mas_equalTo(_firstPriceL.mas_left).offset(-30 * AUTO_WIDTH);
        
       }];
    _mouthPriceL.text = @"月供3483元";
    _mouthPriceL.textColor = HS;
    _mouthPriceL.font = [UIFont fontWithName:ZIXING size:TEXTLABELFONT];
    //第三个车价
    _totalPriceL = [UILabel new];
    [self.contentView addSubview:_totalPriceL];
    [_totalPriceL mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.height.mas_equalTo(_firstPriceL);
        make.left.mas_equalTo(_firstPriceL.mas_right).offset(30 * AUTO_WIDTH);
        
        
    }];
    _totalPriceL.text = @"车价200万";
    _totalPriceL.textColor = HS;
    _totalPriceL.font = [UIFont fontWithName:ZIXING size:TEXTLABELFONT];
    
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
